<?php
$routerGroup = new \Phalcon\Mvc\Router\Group(['module' => 'user']);

$routerGroup -> setPrefix('/user');

//$routerGroup -> addGet('(/?)', ['controller'=>'Index','action'=>'index']) -> setName('UserIndex::index');
$routerGroup -> addGet('/:int', ['controller'=>'Index','action'=>'findFirstById','id'=>1]) -> setName('UserIndex::findFirstById');
$routerGroup -> addGet('/account/([a-zA-Z0-9\_\-]+)', ['controller'=>'Index','action'=>'findFirstByAccount','account'=>1]) -> setName('UserIndex::findFirstByAccount');
$routerGroup -> addPost('(/?)', ['controller'=>'Index','action'=>'create']) -> setName('UserIndex::create');
$routerGroup -> addPut('/:int', ['controller'=>'Index','action'=>'update','id'=>1]) -> setName('UserIndex::update');
$routerGroup -> addDelete('/:int', ['controller'=>'Index','action'=>'delete','id'=>1]) -> setName('UserIndex::delete');

$routerGroup -> addPost('/wallet/recharge', ['controller'=>'Wallet','action'=>'recharge']) -> setName('UserWallet::recharge');

$routerGroup -> addGet('/backstage/message', ['controller'=>'Message','action'=>'index']) -> setName('UserMessage::index');
$routerGroup -> addPut('/backstage/message/:int', ['controller'=>'Message','action'=>'update','id'=>1]) -> setName('UserMessage::update');

$routerGroup -> addGet('/backstage/team/:int', ['controller'=>'Team','action'=>'index','id'=>1]) -> setName('UserTeam::index');

$routerGroup -> addGet('/backstage/parent/:int', ['controller'=>'Parent','action'=>'index','id'=>1]) -> setName('UserParent::index');

return $routerGroup;